package com.probiz.estoresa.product.web.action;

import javax.servlet.http.HttpServletRequest;

import org.springframework.validation.BindException;

import com.probiz.estore.common.model.product.ReviewVote;
import com.probiz.estore.core.controller.GenericStoreAdminController;
import com.probiz.estore.product.service.ReviewVoteManager;

public class ReviewVoteController extends GenericStoreAdminController<ReviewVote> {
    private ReviewVoteManager reviewVoteManager = null;

    public void setReviewVoteManager(ReviewVoteManager inMgr) {
        this.reviewVoteManager = inMgr;
    }

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.probiz.estore.core.controller.GenericController#getEntityName(java.lang.Object)
	 */
	@Override
	protected String getEntityName(ReviewVote entity) {
		return entity.getReviewVoteName();
	}


	/*
	 * (non-Javadoc)
	 * 
	 * @see com.probiz.estore.core.controller.BaseController#initController()
	 */
	@Override
	protected void initController() throws Exception {
		mgr = reviewVoteManager;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.probiz.estore.core.controller.GenericController#preSave(javax.servlet.http.HttpServletRequest,
	 *      java.lang.Object, org.springframework.validation.BindException)
	 */
	@Override
	protected void preSave(HttpServletRequest request, ReviewVote entity, BindException errors) {
	}

}
